|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfurny.furndb.importer.FileModelSource
public class FileModelSource
Implementation of a model source, that iterates over selected files from a given path.
Field Summary | |
---|---|
private java.lang.String |
assetPath
|
private java.util.List<java.io.File> |
files
|
private int |
index
|
private static java.util.logging.Logger |
LOGGER
|
Constructor Summary | |
---|---|
FileModelSource(java.lang.String assetPath,
java.util.List<java.io.File> files)
Creates a new model source, that iterates over selected files from a given path. |
Method Summary | |
---|---|
int |
getSize()
Returns the number of elements. |
boolean |
hasNext()
Method to check if more elements are there. |
Furniture |
next()
Gets the next element. |
Furniture |
next(int offset)
This methods works like next(), but allows to skip elements. |
Furniture |
previous()
Gets the previous element. |
void |
reset()
Resets and starts at the first element. |
void |
seek(Furniture furn)
Seeks the given furniture and remembers its position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger LOGGER
private final java.lang.String assetPath
private final java.util.List<java.io.File> files
private int index
Constructor Detail |
---|
public FileModelSource(java.lang.String assetPath, java.util.List<java.io.File> files)
assetPath
- The path of the files to iteratefiles
- The files to iterate, must be children of the given pathMethod Detail |
---|
public void reset()
IModelSource
reset
in interface IModelSource
public void seek(Furniture furn)
IModelSource
seek
in interface IModelSource
furn
- The furniture to seekpublic boolean hasNext()
IModelSource
hasNext
in interface IModelSource
public Furniture next(int offset)
IModelSource
next
in interface IModelSource
offset
- The offset of elements
public Furniture next()
IModelSource
next
in interface IModelSource
public Furniture previous()
IModelSource
previous
in interface IModelSource
public int getSize()
IModelSource
getSize
in interface IModelSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |